package cn.edu.cug.cs.gtl.oi.ui.menu;

import javax.swing.*;
import java.awt.event.KeyEvent;

public class JMenuTool extends JMenu {
    public JMenuTool() {
        this.setText("工具(T)");
        this.setMnemonic(KeyEvent.VK_T);
        init();
    }

    void init() {
        JMenu MenuMapUnit = new JMenu("图幅");

        JMenuItem ItemCombineTile = new JMenuItem("组合图块");
        ItemCombineTile.setEnabled(false);
        MenuMapUnit.add(ItemCombineTile);

        JMenuItem ItemDecomposeTile = new JMenuItem("分解图块");
        ItemDecomposeTile.setEnabled(false);
        MenuMapUnit.add(ItemDecomposeTile);
        MenuMapUnit.addSeparator();

        JMenuItem ItemNewLayer = new JMenuItem("新建图层");
        MenuMapUnit.add(ItemNewLayer);
        MenuMapUnit.addSeparator();

        JMenuItem ItemShowCurrentLayer = new JMenuItem("显示当前层");
        MenuMapUnit.add(ItemShowCurrentLayer);

        JMenuItem ItemHideCurrentLayer = new JMenuItem("隐藏当前层");
        MenuMapUnit.add(ItemHideCurrentLayer);

        JMenuItem ItemFreezeCurrentLayer = new JMenuItem("冻结当前层");
        MenuMapUnit.add(ItemFreezeCurrentLayer);

        JMenuItem ItemDeleteCurrentLayer = new JMenuItem("删除当前层");
        MenuMapUnit.add(ItemDeleteCurrentLayer);

        JMenuItem ItemCopyCurrentLayer = new JMenuItem("当前层属性");
        MenuMapUnit.add(ItemCopyCurrentLayer);
        MenuMapUnit.addSeparator();

        JMenuItem ItemShowAllLayer = new JMenuItem("显示所有层");
        MenuMapUnit.add(ItemShowAllLayer);

        JMenuItem ItemHideAllLayer = new JMenuItem("隐藏所有层");
        MenuMapUnit.add(ItemHideAllLayer);

        JMenuItem ItemDeleteAllLayer = new JMenuItem("删除所有层");
        MenuMapUnit.add(ItemDeleteAllLayer);
        MenuMapUnit.addSeparator();

        JMenuItem ItemMergeLayer = new JMenuItem("合并图层");
        MenuMapUnit.add(ItemMergeLayer);
        MenuMapUnit.addSeparator();

        JMenuItem ItemLayerSetting = new JMenuItem("图层设置");
        MenuMapUnit.add(ItemLayerSetting);

        this.add(MenuMapUnit);
        this.addSeparator();

        JMenuItem ItemCoordinateTransform = new JMenuItem("坐标变换");
        this.add(ItemCoordinateTransform);
        this.addSeparator();

        JMenuItem ItemLinearTransform = new JMenuItem("线性变换");
        this.add(ItemLinearTransform);

        JMenuItem ItemRectangleTransform = new JMenuItem("矩形变换");
        this.add(ItemRectangleTransform);

        JMenuItem ItemBoundingBoxTransform = new JMenuItem("包围盒变换");
        this.add(ItemBoundingBoxTransform);
        this.addSeparator();

        JMenuItem ItemCoordinateModify = new JMenuItem("坐标统改");
        this.add(ItemCoordinateModify);
        this.addSeparator();

        JMenuItem ItemDataRange = new JMenuItem("数据范围");
        this.add(ItemDataRange);
    }
}
